library(hydroGOF)
library(clusterSim)
library(DAAG)

data1=read.csv("C:/in/npp_data.csv")


model1=lm(pm~aod,data1)
modcv=cv.lm(df=data1,model1,m=3)

model_re=sum(abs(data1$pm-modcv$cvpred)/data1$pm)/nrow(data1)*100
model_rmse=rmse(data1$pm,modcv$cvpred)
model_r=cor(data1$pm,modcv$cvpred)

print(paste("Samples:",nrow(data1)))
print(paste("R2:",round(model_r*model_r,3)))
print(paste("RMSE:",round(model_rmse,3)))
print(paste("RE:",round(model_re,3)))

print("------------------")



	
	
	
